﻿package core.ui.options
{
    import core.ui.controls.*;
    import flash.display.*;

    public class FillOptions extends Sprite implements IToolOptions
    {
        var tolerance:Dropslider;
        var opacity:Dropslider;
        var antialias:Checkbox;
        var contiguous:Checkbox;
        var all:Checkbox;

        public function FillOptions(param1:Tuyitu)
        {
            var _loc_2:* = 10;
            var _loc_3:* = 15;
            var _loc_4:* = new Literal("rm_opacity");
            _loc_4.x = _loc_2;
            _loc_4.y = 2;
            addChild(_loc_4);
            _loc_2 = _loc_2 + _loc_4.width;
            this.opacity = new Dropslider(50, 0, 100, 100);
            this.opacity.x = _loc_2;
            this.opacity.y = 2;
            addChild(this.opacity);
            _loc_2 = _loc_2 + (50 + _loc_3);
            var _loc_5:* = new BarSplit();
            _loc_5.x = _loc_2;
            addChild(_loc_5);
            _loc_2 = _loc_2 + (2 + _loc_3);
            _loc_2 = _loc_2 - 5;
            var _loc_6:* = new Literal("rm_tolerance");
            _loc_6.x = _loc_2;
            _loc_6.y = 2;
            addChild(_loc_6);
            _loc_2 = _loc_2 + _loc_6.width;
            this.tolerance = new Dropslider(50, 0, 255, 21);
            this.tolerance.x = _loc_2;
            this.tolerance.y = 2;
            addChild(this.tolerance);
            _loc_2 = _loc_2 + (50 + _loc_3);
            var _loc_7:* = new BarSplit();
            _loc_7.x = _loc_2;
            addChild(_loc_7);
            _loc_2 = _loc_2 + (2 + _loc_3);
            this.antialias = new Checkbox("rm_anti_alias");
            this.antialias.x = _loc_2;
            this.antialias.y = 3;
            this.antialias.Check();
            addChild(this.antialias);
            _loc_2 = _loc_2 + (this.antialias.width + _loc_3);
            this.contiguous = new Checkbox("rm_contiguous");
            this.contiguous.x = _loc_2;
            this.contiguous.y = 3;
            this.contiguous.Check();
            addChild(this.contiguous);
            _loc_2 = _loc_2 + (this.contiguous.width + _loc_3);
            this.all = new Checkbox("rm_all_layers");
            this.all.x = _loc_2;
            this.all.y = 3;
            addChild(this.all);
            return;
        }// end function

        public function get options() : Object
        {
            return {opacity:this.opacity.value / 100, tolerance:this.tolerance.value, antialias:this.antialias.checked, contiguous:this.contiguous.checked, all:this.all.checked};
        }// end function

    }
}
